<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
    <title></title>
    <meta charset="utf-8">
    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" href="css/ui-base.css">
    <link rel="stylesheet" href="css/ui-box.css">
	<link rel="stylesheet" href="css/project/style.css">
    <script src="js/zy_control.js"></script>
    <script src="js/main.js"></script>
	<script src="js/init.js"></script>
	<script type="text/javascript" src="js/JsonSQL/jsonsql-0.1.js"></script>
	<script src="js/talkingdata.js"></script>
	<style>
	.lkinfo_vip{color:#898989; background-color:#fff; border-top:1px solid #d7d7d7; margin:2em 0 1em 0;padding:0.8125em 0.625em;}
	.lkinfob{ border-right:1px solid #d7d7d7; width:2em; padding:0 0.2em }
	.lkinfob1{width:2em; padding:0 0.2em }
	.lkinfsh{ font-size:0.8125em}
	.lkinfdi{ padding-top:0.5em;font-size:0.7em}
	.binfo_t{ border-bottom:solid #d7d7d7 1px;}
	.passenger_nam{ border-top:solid #d7d7d7 1px;  background:#f8f8f8}
	.binfo_ku{ background-color:#fff; color:#969696; font-size:0.8em;}
	.lk_ren{ background-image:url(images/lk_ren.png);}
	.lkinforen{ padding-top:0.3em;}
	.umw4_1{width:5em;}
	#passenger_inform div{ line-height:1.5em}
	</style>
</head>
<body class="um-vp lkinfo_bg" ontouchstart >
<div style='height:0.8em;'></div>
<div id="passenger_inform" > 
</div>
</body>
<script>
zy_init();
window.uexOnload=function(type){
	if(!type){
		uexWindow.setBounce("0");
		IC.talkingDataCount("旅客信息","0003");
	}
	Loading(0);
	passenger_inform();
}
var search_name    = localStorage.getItem("search_name");
var state = localStorage.getItem("state");//状态为1使用的是订票接口
var MessageId = localStorage.getItem("MessageId");
var jsona = localStorage.getItem("zvData");
function passenger_inform(){
	var strx = "";
	if(state==1)
	{
		var jsondate = strToJson(jsona)
		var passengersInfo=jsondate.passengersInfo
		var JosnStr = JSON.stringify(passengersInfo);
		JosnStr = "{\"data\": {\"items\":"+JosnStr+"}}";
		var json = strToJson(JosnStr);
		MessageId = MessageId.split("|")
		for (var s = 0; s < MessageId.length; s++) {
			var data = jsonsql.query("select * from json.data.items where (registrationInfo=='" + MessageId[s] + "'  )", json);
			for (var i = 0; i < data.length; i++) 
			{
				var contactInfo=data[i].contactInfo
				if(contactInfo!='')
				{
					contactInfo = contactInfo.split("手机+");
					contactInfo = contactInfo[1];//手机
					if(contactInfo!='' && contactInfo!='null'&& contactInfo!='undefined'&& contactInfo!=undefined)
					{
						contactInfo = contactInfo.substring(0,11)	
					}
					else
					{
						contactInfo=''
					}
					//var contactInfo = getNum(contactInfo);//获取联系电话
				}
				var registrationInfo=data[i].registrationInfo
				if(registrationInfo!='')
				{
					registrationInfo = registrationInfo.split("+");
					registrationInfo = registrationInfo[1];//
					registrationInfo = registrationInfo.split(";");
					registrationInfo = registrationInfo[0];
					
				}
				var shipment = data[i].shipment;
				if(shipment!='')
				{
					shipment = shipment.substring(0, 1);//舱位
				}
				
				if (search_name != '') {
					var Cts = "a" + data[i].name;
					if (Cts.indexOf(search_name) > 0 )//查询判断
					{
						strx += '<div class="ub ub-ver binfo_ku" style="margin-bottom:1em">';
						strx += '<div class="uinn umh4 umw3 binfo_t ub-ac passenger_nam">';
						strx += '<div class="ub lkinforen">';
						strx += '<div class="umw2 ub-img lk_ren"></div>';
						strx += '<div class="ub umw4_1 ub-ac">姓名</div>';
						strx += '<div class="ub ub-f1 ub-ac">' + data[i].name + '</div>';
						strx += '</div>';
						strx += '</div>';
						strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
						strx += '<div class="ub lkinforen">';
						strx += '<div class="umw2 ub-img"></div>';
						strx += '<div class="ub umw4_1 ub-ac">座位号</div>';
						strx += '<div class="ub ub-f1 ub-ac">' + data[i].seatNbr + '</div>';
						strx += '</div>';
						strx += '</div>';
						strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
						strx += '<div class="ub lkinforen ">';
						strx += '<div class="umw2 ub-img "></div>';
						strx += '<div class="ub umw4_1 ub-ac">联系电话</div>';
						strx += '<div class="ub ub-f1 ub-ac">' +contactInfo + '</div>';
						if (contactInfo != '') {
						strx += '<div class="ub ub-f1 ub-ac" ><img src="images/lk_phone.png" class="call' + contactInfo + '"   onclick=uexCall.call(' + contactInfo + ')   style="display:block;height:1.5em"/> </div>';
						}
						strx += '</div>';
						strx += '</div>';
						strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
						strx += '<div class="ub lkinforen">';
						strx += '<div class="umw2 ub-img"></div>';
						strx += '<div class="ub umw4_1 ub-ac">证件号码</div>';
						strx += '<div class="ub ub-f1 ub-ac">' + registrationInfo + '</div>';
						strx += '</div>';
						strx += '</div>';
						strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
						strx += '<div class="ub lkinforen">';
						strx += '<div class="umw2 ub-img"></div>';
						strx += '<div class="ub umw4_1 ub-ac">舱位</div>';
						strx += '<div class="ub umw4_1 ub-ac">' + shipment + '</div>';
						strx += '</div> ';
						strx += '</div>';
						strx += '</div>';		
					}
				}
				else
				{
					strx += '<div class="ub ub-ver binfo_ku" style="margin-bottom:1em">';
					strx += '<div class="uinn umh4 umw3 binfo_t ub-ac passenger_nam">';
					strx += '<div class="ub lkinforen">';
					strx += '<div class="umw2 ub-img lk_ren"></div>';
					strx += '<div class="ub umw4_1 ub-ac">姓名</div>';
					strx += '<div class="ub ub-f1 ub-ac">' + data[i].name + '</div>';
					strx += '</div>';
					strx += '</div>';
					strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
					strx += '<div class="ub lkinforen">';
					strx += '<div class="umw2 ub-img"></div>';
					strx += '<div class="ub umw4_1 ub-ac">座位号</div>';
					strx += '<div class="ub ub-f1 ub-ac">' + data[i].seatNbr + '</div>';
					strx += '</div>';
					strx += '</div>';
					strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
					strx += '<div class="ub lkinforen ">';
					strx += '<div class="umw2 ub-img "></div>';
					strx += '<div class="ub umw4_1 ub-ac">联系电话</div>';
					strx += '<div class="ub ub-f1 ub-ac">' +contactInfo + '</div>';
					if (contactInfo != '') {
						strx += '<div class="ub ub-f1 ub-ac" ><img src="images/lk_phone.png" class="call' + contactInfo + '"   onclick=uexCall.call(' + contactInfo + ')   style="display:block;height:1.5em"/> </div>';
						}
					strx += '</div>';
					strx += '</div>';
					strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
					strx += '<div class="ub lkinforen">';
					strx += '<div class="umw2 ub-img"></div>';
					strx += '<div class="ub umw4_1 ub-ac">证件号码</div>';
					strx += '<div class="ub ub-f1 ub-ac">' + registrationInfo + '</div>';
					strx += '</div>';
					strx += '</div>';
					strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
					strx += '<div class="ub lkinforen">';
					strx += '<div class="umw2 ub-img"></div>';
					strx += '<div class="ub umw4_1 ub-ac">舱位</div>';
					strx += '<div class="ub umw4_1 ub-ac">' + shipment + '</div>';
					strx += '</div> ';
					strx += '</div>';
					strx += '</div>';	
				}	
			}	
		}	
 	Loading(-1);
	}
	else
	{
			if (MessageId != "" && MessageId != "0" && MessageId != "undefined" && MessageId != undefined) {
				jsonstr = "{\"data\": {\"items\":"+jsona+"}}";
				var json = strToJson(jsonstr);
				MessageId = MessageId.split("|")
				for (var s = 0; s < MessageId.length; s++) {
					var data = jsonsql.query("select * from json.data.items where (MessageId=='"+MessageId[s]+"'  )", json);
					for (var i = 0; i < data.length; i++) {
						var CNIN = data[i].CNIN;//中文名
						if (CNIN == '') {
							var CNIN = data[i].PName;//如果中文名为空取英文名
						}
						var CabinNo = data[i].CabinNo;
						var CabinNo = CabinNo.substring(CabinNo.length, CabinNo.length - 1);//舱位后一位
						var WK = data[i].WK;
						if (WK == '') {
							WK = '/0/';
						}
						var a = WK.split("/");
						var WK = a[1];//行李数
						var CKIN = data[i].CKIN;
						if (CKIN != '') {
							var CKIN = getNum(CKIN);//获取联系电话
						}
						//特殊服务
						var specialSSR=''
						var SSR=data[i].SSR
						if(SSR=='BLND'){specialSSR='盲人旅客'}
						if(SSR=='CHD1'){specialSSR='儿童1个'}
						if(SSR=='CHD2'){specialSSR='儿童2个'}
						if(SSR=='DEAF'){specialSSR='耳聋旅客'}
						if(SSR=='ID1'){specialSSR='PAD旅客'}
						if(SSR=='INF1'){specialSSR='婴儿1个'}
						if(SSR=='INF2'){specialSSR='婴儿2个'}
						if(SSR=='STCR'){specialSSR='担架旅客'}
						if(SSR=='UM'){specialSSR='无人照看儿童'}
						if(SSR=='WCBD'){specialSSR='轮椅'}
						if(SSR=='WCBW'){specialSSR='轮椅'}
						if(SSR=='WCHC'){specialSSR='轮椅(旅客完全固定在轮椅上)'}
						if(SSR=='WCHR'){specialSSR='轮椅(旅客能到达座位)'}
						if(SSR=='WCHS'){specialSSR='轮椅(旅客不能升降梯子)'}
						if(SSR=='WCMP'){specialSSR='轮椅(人工动力)'}
						if(SSR=='WCOB'){specialSSR='飞机上的轮椅(由航空公司提供)'}		
						var specialSSRdiv=''				
						if (specialSSR!= '') {
									specialSSRdiv= '<div class="uinn umh4 umw3 binfo_t ub-ac"><div class="ub lkinforen"><div class="umw2 ub-img"></div><div class="ub umw4_1 ub-ac">特殊服务</div><div class="ub ub-f1 ub-ac">' +specialSSR + '</div></div></div>';
						}
						
						//特殊餐饮
						var specialSPML=''
						var SPML=data[i].SPML
						if(SPML=='AVML'){specialSPML='亚洲素食'}
						if(SPML=='BBML'){specialSPML='婴儿餐食'}
						if(SPML=='BLML'){specialSPML='溃疡餐'}
						if(SPML=='CHML'){specialSPML='儿童餐食'}
						if(SPML=='DBML'){specialSPML='糖尿病人的餐食'}
						if(SPML=='FPML'){specialSPML='鲜水果餐'}
						if(SPML=='GFML'){specialSPML='无麸质餐'}
						if(SPML=='HNML'){specialSPML='印度餐'}
						if(SPML=='IVML'){specialSPML='印度素食'}
						if(SPML=='JNML'){specialSPML='耆那教餐'}
						if(SPML=='JPML'){specialSPML='日本餐'}
						if(SPML=='KSML'){specialSPML='犹太餐'}
						if(SPML=='LCML'){specialSPML='低卡路里'}
						if(SPML=='LFML'){specialSPML='低胆固醇餐，低脂肪餐'}
						if(SPML=='LPML'){specialSPML='低蛋白质餐'}
						if(SPML=='LSML'){specialSPML='低钠、无盐'}
						if(SPML=='LTML'){specialSPML='营养餐'}
						if(SPML=='MOML'){specialSPML='清真餐'}
						if(SPML=='MSML'){specialSPML='穆斯林餐'}
						if(SPML=='NBML'){specialSPML='无牛肉餐'}
						if(SPML=='NLML'){specialSPML='不含乳糖食品'}
						if(SPML=='NVML'){specialSPML='非素食餐'}
						if(SPML=='ORML'){specialSPML='东方餐'}
						var specialSPMLdiv=''				
						if (specialSPML!= '') {
								specialSPMLdiv= '<div class="uinn umh4 umw3 binfo_t ub-ac"><div class="ub lkinforen"><div class="umw2 ub-img"></div><div class="ub umw4_1 ub-ac">特殊餐饮</div><div class="ub ub-f1 ub-ac">' +specialSPML + '</div></div></div>';
						}
						
						if (search_name != '') {
							var Cts = "a" + data[i].CNIN;
							var Cts2 = "a" + data[i].PName;
							if (Cts.indexOf(search_name) > 0 || Cts2.indexOf(search_name) > 0)//查询判断
							{
								strx += '<div class="ub ub-ver binfo_ku" style="margin-bottom:1em">';
								strx += '<div class="uinn umh4 umw3 binfo_t ub-ac passenger_nam">';
								strx += '<div class="ub lkinforen">';
								strx += '<div class="umw2 ub-img lk_ren"></div>';
								strx += '<div class="ub umw4_1 ub-ac">姓名  </div>';
								strx += '<div class="ub ub-f1 ub-ac">' + CNIN + '</div>';
								strx += '</div>';
								strx += '</div>';
								strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
								strx += '<div class="ub lkinforen">';
								strx += '<div class="umw2 ub-img"></div>';
								strx += '<div class="ub umw4_1 ub-ac">座位号</div>';
								strx += '<div class="ub ub-f1 ub-ac">' + data[i].Seat + '</div>';
								strx += '</div>';
								strx += '</div>';
								strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
								strx += '<div class="ub lkinforen ">';
								strx += '<div class="umw2 ub-img "></div>';
								strx += '<div class="ub umw4_1 ub-ac">联系电话</div>';
								strx += '<div class="ub ub-f1 ub-ac">' + CKIN + '</div>';
								if (CKIN != '') {
									strx += '<div class="ub ub-f1 ub-ac" ><img src="images/lk_phone.png" class="call' + CKIN + '"   onclick=uexCall.call(' + CKIN + ')   style="display:block;height:1.5em"/> </div>';
								}
								strx += '</div>';
								strx += '</div>';
								strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
								strx += '<div class="ub lkinforen">';
								strx += '<div class="umw2 ub-img"></div>';
								strx += '<div class="ub umw4_1 ub-ac">证件号码</div>';
								strx += '<div class="ub ub-f1 ub-ac">' + data[i].FOID + '</div>';
								strx += '</div>';
								strx += '</div>';
								strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
								strx += '<div class="ub lkinforen">';
								strx += '<div class="umw2 ub-img"></div>';
								strx += '<div class="ub umw4_1 ub-ac">PNR</div>';
								strx += '<div class="ub ub-f1 ub-ac">' + data[i].PNR + '</div>';
								strx += '</div> ';
								strx += '</div>';
								strx += specialSSRdiv;
								strx += specialSPMLdiv;
								strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
								strx += '<div class="ub lkinforen">';
								strx += '<div class="umw2 ub-img"></div>';
								strx += '<div class="ub umw4_1 ub-ac">舱位</div>';
								strx += '<div class="ub umw4_1 ub-ac">' + CabinNo + '</div>';
								strx += '<div class="ub ub-f1 ub-ac"></div>';
								strx += '<div class="ub umw4_1 ub-ac">行李件数</div>';
								strx += '<div class="ub ub-f1 ub-ac">' + WK + '</div>';
								strx += '</div> ';
								strx += '</div>';
								if (data[i].Package != '') {
									var Package = data[i].Package;
									var Package = Package.split(" ");
									for (var p = 0; p < Package.length; p++) {
										if (Package[p] != "") {
											var PackageList = Package[p].split("/");
											strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
											strx += '<div class="ub lkinforen">';
											strx += '<div class="umw2 ub-img"></div>';
											strx += '<div class="ub umw4_1 ub-ac">行李编号</div>';
											strx += '<div class="ub ub-f1 ub-ac"><img src="images/luggage.png"   style="height:1.2em"/> ' + PackageList[0] + '</div>';
											strx += '</div> ';
											strx += '</div>';
										}
									}
								}
								strx += '</div>';	
							}
						}
						else
						{
							strx += '<div class="ub ub-ver binfo_ku" style="margin-bottom:1em">';
							strx += '<div class="uinn umh4 umw3 binfo_t ub-ac passenger_nam">';
							strx += '<div class="ub lkinforen">';
							strx += '<div class="umw2 ub-img lk_ren"></div>';
							strx += '<div class="ub umw4_1 ub-ac">姓名  </div>';
							strx += '<div class="ub ub-f1 ub-ac">' + CNIN + '</div>';
							strx += '</div>';
							strx += '</div>';
							strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
							strx += '<div class="ub lkinforen">';
							strx += '<div class="umw2 ub-img"></div>';
							strx += '<div class="ub umw4_1 ub-ac">座位号</div>';
							strx += '<div class="ub ub-f1 ub-ac">' + data[i].Seat + '</div>';
							strx += '</div>';
							strx += '</div>';
							strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
							strx += '<div class="ub lkinforen ">';
							strx += '<div class="umw2 ub-img "></div>';
							strx += '<div class="ub umw4_1 ub-ac">联系电话</div>';
							strx += '<div class="ub ub-f1 ub-ac">' + CKIN + '</div>';
							if (CKIN != '') {
								strx += '<div class="ub ub-f1 ub-ac" ><img src="images/lk_phone.png" class="call' + CKIN + '"   onclick=uexCall.call(' + CKIN + ')   style="display:block;height:1.5em"/> </div>';
							}
							strx += '</div>';
							strx += '</div>';
							strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
							strx += '<div class="ub lkinforen">';
							strx += '<div class="umw2 ub-img"></div>';
							strx += '<div class="ub umw4_1 ub-ac">证件号码</div>';
							strx += '<div class="ub ub-f1 ub-ac">' + data[i].FOID + '</div>';
							strx += '</div>';
							strx += '</div>';
							strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
							strx += '<div class="ub lkinforen">';
							strx += '<div class="umw2 ub-img"></div>';
							strx += '<div class="ub umw4_1 ub-ac">PNR</div>';
							strx += '<div class="ub ub-f1 ub-ac">' + data[i].PNR + '</div>';
							strx += '</div> ';
							strx += '</div>';
							strx += specialSSRdiv;
							strx += specialSPMLdiv;
							strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
							strx += '<div class="ub lkinforen">';
							strx += '<div class="umw2 ub-img"></div>';
							strx += '<div class="ub umw4_1 ub-ac">舱位</div>';
							strx += '<div class="ub umw4_1 ub-ac">' + CabinNo + '</div>';
							strx += '<div class="ub ub-f1 ub-ac"></div>';
							strx += '<div class="ub umw4_1 ub-ac">行李件数</div>';
							strx += '<div class="ub ub-f1 ub-ac">' + WK + '</div>';
							strx += '</div> ';
							strx += '</div>';
							if (data[i].Package != '') {
								var Package = data[i].Package;
								var Package = Package.split(" ");
								for (var p = 0; p < Package.length; p++) {
									if (Package[p] != "") {
										var PackageList = Package[p].split("/");
										strx += '<div class="uinn umh4 umw3 binfo_t ub-ac">';
										strx += '<div class="ub lkinforen">';
										strx += '<div class="umw2 ub-img"></div>';
										strx += '<div class="ub umw4_1 ub-ac">行李编号</div>';
										strx += '<div class="ub ub-f1 ub-ac"><img src="images/luggage.png"   style="height:1.2em"/> ' + PackageList[0] + '</div>';
										strx += '</div> ';
										strx += '</div>';
									}
								}
							}
							strx += '</div>';
						}				
					}			
				}
			}
			 Loading(-1);
	}	
	
	localStorage.setItem("search_name","");
	$$("passenger_inform").innerHTML=strx;
}	
</script>
</html>
